package chuangyi.com.org.ViewModel;

import android.content.Context;
import android.databinding.Bindable;

import chuangyi.com.org.DOMIHome.BR;
import chuangyi.com.org.DOMIHome.R;
import chuangyi.com.org.DOMIHome.adapter.ListBindingAdapter;

/**
 * Created by zxh on 16/12/11.
 */

public class ApplyExpertProgress extends ObservableWithGoBackHandler {
    private ListBindingAdapter applyList;

    @Bindable
    public ListBindingAdapter getApplyList() {
        return applyList;
    }

    public ApplyExpertProgress(Context context) {
        super(context);
        super.getHandler().setTitle("申请成为专家");
        applyList = new ListBindingAdapter<ApplyItem>(context, BR.applyItem);
        init();
    }

    private void init() {
        ApplyItem item = new ApplyItem(getContext(), R.layout.i_apply_item, 0);
        item.setTitle("完善个人信息");
        item.setImageSrc(R.mipmap.apply1);
        item.setCompleted(true);
        applyList.add(item);

        item = new ApplyItem(getContext(), R.layout.i_apply_item, 1);
        item.setTitle("同意并签约平台协议");
        item.setImageSrc(R.mipmap.apply2);
        applyList.add(item);

        item = new ApplyItem(getContext(), R.layout.i_apply_item, 2);
        item.setTitle("预约审核");
        item.setImageSrc(R.mipmap.apply3);
        applyList.add(item);

        item = new ApplyItem(getContext(), R.layout.i_apply_item, 3);
        item.setTitle("审核");
        item.setImageSrc(R.mipmap.apply3);
        applyList.add(item);

        item = new ApplyItem(getContext(), R.layout.i_apply_item_last, 4);
        item.setTitle("成为专家");
        item.setImageSrc(R.mipmap.apply3);
        applyList.add(item);
    }
}
